package org.ls.petclinic.dao.impl;

import org.ls.petclinic.dao.SpecialtiesDao;
import org.ls.petclinic.pojo.Specialties;

import java.util.List;

/**
 * @author 浪矢先生
 * @description
 * @create 2022-12-05 21:48
 */
public class SpecialtiesDaoImpl extends BaseDao implements SpecialtiesDao {
    @Override
    public List<Specialties> getAll() {
        return queryForList(Specialties.class,"select * from specialties");
    }

    @Override
    public Specialties getByName(String name) {
        return queryForOne(Specialties.class,"select * from specialties where name=?",name);
    }

    @Override
    public Specialties getById(Long specialtyId) {

        return queryForOne(Specialties.class,"select * from specialties where id=?",specialtyId);
    }
}
